<!DOCTYPE HTML>
<html>
	<head>
		<meta http-equiv="Content-Type" content="html/html; charset=utf-8" />
		<title>OdbcAppDelegate Class Reference</title>
		<meta id="xcode-display" name="xcode-display" content="render"/>
		<link rel="stylesheet" type="text/css" href="../css/styles.css" media="all" />
		<link rel="stylesheet" type="text/css" media="print" href="../css/stylesPrint.css" />
		<meta name="generator" content="appledoc 2.2 (build 961)" />
	</head>
	<body>
		<header id="top_header">
			<div id="library" class="hideInXcode">
				<h1><a id="libraryTitle" href="../index.html">Odbc </a></h1>
				<a id="developerHome" href="../index.html">Datakonsulten AB</a>
			</div>
			
			<div id="title" role="banner">
				<h1 class="hideInXcode">OdbcAppDelegate Class Reference</h1>
			</div>
			<ul id="headerButtons" role="toolbar">
				<li id="toc_button">
					<button aria-label="Show Table of Contents" role="checkbox" class="open" id="table_of_contents"><span class="disclosure"></span>Table of Contents</button>
				</li>
				<li id="jumpto_button" role="navigation">
					<select id="jumpTo">
	<option value="top">Jump To&#133;</option>
	
	<option value="overview">Overview</option>
	
	
	
	
	<option value="tasks">Tasks</option>
	
	
	
	
	
	<option value="properties">Properties</option>
	
	<option value="//api/name/applicationFilesDirectory">&nbsp;&nbsp;&nbsp;&nbsp;applicationFilesDirectory</option>
	
	<option value="//api/name/loginUrl">&nbsp;&nbsp;&nbsp;&nbsp;loginUrl</option>
	
	<option value="//api/name/managedObjectContext">&nbsp;&nbsp;&nbsp;&nbsp;managedObjectContext</option>
	
	<option value="//api/name/managedObjectModel">&nbsp;&nbsp;&nbsp;&nbsp;managedObjectModel</option>
	
	<option value="//api/name/modelFileName">&nbsp;&nbsp;&nbsp;&nbsp;modelFileName</option>
	
	<option value="//api/name/persistentStoreClass">&nbsp;&nbsp;&nbsp;&nbsp;persistentStoreClass</option>
	
	<option value="//api/name/persistentStoreCoordinator">&nbsp;&nbsp;&nbsp;&nbsp;persistentStoreCoordinator</option>
	
	<option value="//api/name/persistentStoreType">&nbsp;&nbsp;&nbsp;&nbsp;persistentStoreType</option>
	
	<option value="//api/name/persistentStoreUrl">&nbsp;&nbsp;&nbsp;&nbsp;persistentStoreUrl</option>
	
	<option value="//api/name/productName">&nbsp;&nbsp;&nbsp;&nbsp;productName</option>
	
	
	
	
	
	
	<option value="instance_methods">Instance Methods</option>
	
	<option value="//api/name/applicationDidFinishLaunching:">&nbsp;&nbsp;&nbsp;&nbsp;- applicationDidFinishLaunching:</option>
	
	<option value="//api/name/applicationShouldTerminate:">&nbsp;&nbsp;&nbsp;&nbsp;- applicationShouldTerminate:</option>
	
	<option value="//api/name/predicateForEntity:">&nbsp;&nbsp;&nbsp;&nbsp;- predicateForEntity:</option>
	
	<option value="//api/name/reloadAction:">&nbsp;&nbsp;&nbsp;&nbsp;- reloadAction:</option>
	
	<option value="//api/name/saveAction:">&nbsp;&nbsp;&nbsp;&nbsp;- saveAction:</option>
	
	<option value="//api/name/shouldSaveDataOnExit">&nbsp;&nbsp;&nbsp;&nbsp;- shouldSaveDataOnExit</option>
	
	<option value="//api/name/windowWillReturnUndoManager:">&nbsp;&nbsp;&nbsp;&nbsp;- windowWillReturnUndoManager:</option>
	
	
	
</select>
				</li>
			</ul>
		</header>
		<nav id="tocContainer" class="isShowingTOC">
			<ul id="toc" role="tree">
				
<li role="treeitem"><span class="nodisclosure"></span><span class="sectionName"><a href="#overview">Overview</a></span></li>




<li role="treeitem" id="task_treeitem"><span class="nodisclosure"></span><span class="sectionName"><a href="#tasks">Tasks</a></span><ul>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#task_Methods to override">Methods to override</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#task_Properties to bind to">Properties to bind to</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#task_Other properties">Other properties</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#task_Implemented actions">Implemented actions</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#task_Launching and termination">Launching and termination</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#task_Other methods">Other methods</a></span></li>
	
</ul></li>





<li role="treeitem" class="children"><span class="disclosure"></span><span class="sectionName"><a href="#properties">Properties</a></span><ul>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/applicationFilesDirectory">applicationFilesDirectory</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/loginUrl">loginUrl</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/managedObjectContext">managedObjectContext</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/managedObjectModel">managedObjectModel</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/modelFileName">modelFileName</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/persistentStoreClass">persistentStoreClass</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/persistentStoreCoordinator">persistentStoreCoordinator</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/persistentStoreType">persistentStoreType</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/persistentStoreUrl">persistentStoreUrl</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/productName">productName</a></span></li>
	
</ul></li>





<li role="treeitem" class="children"><span class="disclosure"></span><span class="sectionName"><a href="#instance_methods">Instance Methods</a></span><ul>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/applicationDidFinishLaunching:">applicationDidFinishLaunching:</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/applicationShouldTerminate:">applicationShouldTerminate:</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/predicateForEntity:">predicateForEntity:</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/reloadAction:">reloadAction:</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/saveAction:">saveAction:</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/shouldSaveDataOnExit">shouldSaveDataOnExit</a></span></li>
	
	<li><span class="nodisclosure"></span><span class="sectionName"><a href="#//api/name/windowWillReturnUndoManager:">windowWillReturnUndoManager:</a></span></li>
	
</ul></li>


			</ul>
		</nav>
		<article>
			<div id="contents" class="isShowingTOC" role="main">
				<a title="OdbcAppDelegate Class Reference" name="top"></a>
				<div class="main-navigation navigation-top">
					<ul>
	<li><a href="../index.html">Index</a></li>
	<li><a href="../hierarchy.html">Hierarchy</a></li>
</ul>
				</div>
				<div id="header">
					<div class="section-header">
						<h1 class="title title-header">OdbcAppDelegate Class Reference</h1>
					</div>		
				</div>
				<div id="container">	
					
					<div class="section section-specification"><table cellspacing="0"><tbody>
						<tr>
	<td class="specification-title">Inherits from</td>
	<td class="specification-value">NSObject</td>
</tr><tr>
	<td class="specification-title">Conforms to</td>
	<td class="specification-value">NSApplicationDelegate</td>
</tr><tr>
	<td class="specification-title">Declared in</td>
	<td class="specification-value">OdbcAppDelegate.h</td>
</tr>
						</tbody></table></div>
					
                    
                    
					
					<div class="section section-overview">
						<a title="Overview" name="overview"></a>
						<h2 class="subtitle subtitle-overview">Overview</h2>
						<p>The OdbcAppDelegate class is inteded to be used instead of XCode generated AppDelegate
code when creating a Core Data project.</p>

<p>When creating a new application, uncheck &lsquo;Use Core Data&rsquo; check box. Then let
your AppDelegate inherit from OdbcAppDelegate like this:</p>

<pre><code>
// Appdelegate.h

#import &lt;Cocoa/Cocoa.h&gt;
#import &lt;Odbc/Odbc.h&gt;

@interface AppDelegate : OdbcAppDelegate <NSApplicationDelegate>

@property (assign) IBOutlet NSWindow * window;

@end
</code></pre>


<p>In your now empty AppDelegate.m implement following methods:</p>

<pre><code>

#import "AppDelegate.h"

@implementation AppDelegate

- (void) applicationDidFinishLaunching:(NSNotification *) notification {

    [super applicationDidFinishLaunching : aNotification];
}

- (NSURL *) persistentStoreUrl {

    return self.loginUrl;
}

</code></pre>


<p>The method &lsquo;persistentStoreUrl&rsquo; will be called by OdbcAppDelegate to get ODBC database URL.
The method <a href="#//api/name/loginUrl">loginUrl</a> is implemented by this class. It allows the user to fill in ODBC data
source name (DSN), username, and password using a dialog box. Then it verifies that
the information is correct by connecting to and disconnecting from the database.</p>
					</div>
					
					
					
					
					
					<div class="section section-tasks">
						<a title="Tasks" name="tasks"></a>
						<h2 class="subtitle subtitle-tasks">Tasks</h2>
						
						
						<a title="Methods to override" name="task_Methods to override"></a>
						<h3 class="subsubtitle task-title">Methods to override</h3>

						<ul class="task-list">
							<li>
	<span class="tooltip">
		<code><a href="#//api/name/persistentStoreUrl">&nbsp;&nbsp;persistentStoreUrl</a></code>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/modelFileName">&nbsp;&nbsp;modelFileName</a></code>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/predicateForEntity:">&ndash;&nbsp;predicateForEntity:</a></code>
	</span>
	
	
</li>
						</ul>
						
						
						<a title="Properties to bind to" name="task_Properties to bind to"></a>
						<h3 class="subsubtitle task-title">Properties to bind to</h3>

						<ul class="task-list">
							<li>
	<span class="tooltip">
		<code><a href="#//api/name/managedObjectContext">&nbsp;&nbsp;managedObjectContext</a></code>
	</span>
	<span class="task-item-suffix">property</span>
	
</li>
						</ul>
						
						
						<a title="Other properties" name="task_Other properties"></a>
						<h3 class="subsubtitle task-title">Other properties</h3>

						<ul class="task-list">
							<li>
	<span class="tooltip">
		<code><a href="#//api/name/loginUrl">&nbsp;&nbsp;loginUrl</a></code>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/persistentStoreType">&nbsp;&nbsp;persistentStoreType</a></code>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/persistentStoreClass">&nbsp;&nbsp;persistentStoreClass</a></code>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/managedObjectModel">&nbsp;&nbsp;managedObjectModel</a></code>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/persistentStoreCoordinator">&nbsp;&nbsp;persistentStoreCoordinator</a></code>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/productName">&nbsp;&nbsp;productName</a></code>
	</span>
	<span class="task-item-suffix">property</span>
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/applicationFilesDirectory">&nbsp;&nbsp;applicationFilesDirectory</a></code>
	</span>
	<span class="task-item-suffix">property</span>
	
</li>
						</ul>
						
						
						<a title="Implemented actions" name="task_Implemented actions"></a>
						<h3 class="subsubtitle task-title">Implemented actions</h3>

						<ul class="task-list">
							<li>
	<span class="tooltip">
		<code><a href="#//api/name/saveAction:">&ndash;&nbsp;saveAction:</a></code>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/reloadAction:">&ndash;&nbsp;reloadAction:</a></code>
	</span>
	
	
</li>
						</ul>
						
						
						<a title="Launching and termination" name="task_Launching and termination"></a>
						<h3 class="subsubtitle task-title">Launching and termination</h3>

						<ul class="task-list">
							<li>
	<span class="tooltip">
		<code><a href="#//api/name/applicationDidFinishLaunching:">&ndash;&nbsp;applicationDidFinishLaunching:</a></code>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/applicationShouldTerminate:">&ndash;&nbsp;applicationShouldTerminate:</a></code>
	</span>
	
	
</li><li>
	<span class="tooltip">
		<code><a href="#//api/name/shouldSaveDataOnExit">&ndash;&nbsp;shouldSaveDataOnExit</a></code>
	</span>
	
	
</li>
						</ul>
						
						
						<a title="Other methods" name="task_Other methods"></a>
						<h3 class="subsubtitle task-title">Other methods</h3>

						<ul class="task-list">
							<li>
	<span class="tooltip">
		<code><a href="#//api/name/windowWillReturnUndoManager:">&ndash;&nbsp;windowWillReturnUndoManager:</a></code>
	</span>
	
	
</li>
						</ul>
						
					</div>
					
					
					
					
					
					<div class="section section-methods">
						<a title="Properties" name="properties"></a>
						<h2 class="subtitle subtitle-methods">Properties</h2>
						
						<div class="section-method">
	<a name="//api/name/applicationFilesDirectory" title="applicationFilesDirectory"></a>
	<h3 class="subsubtitle method-title">applicationFilesDirectory</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>This returns an URL to a directory where your application can store data.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>@property (readonly, nonatomic) NSURL *applicationFilesDirectory</code></div>

    
	
	
	
	<div class="method-subsection return">
		<h4 class="method-subtitle parameter-title">Return Value</h4>
		<p>NSURL to applications data directory</p>
	</div>
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">OdbcAppDelegate.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/loginUrl" title="loginUrl"></a>
	<h3 class="subsubtitle method-title">loginUrl</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>This allows the user to login and returns Odbc Url</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>@property (readonly, nonatomic) NSURL *loginUrl</code></div>

    
	
	
	
	<div class="method-subsection return">
		<h4 class="method-subtitle parameter-title">Return Value</h4>
		<p>NSURL</p>

<p>This method displays a login dialog and lets the user to login. If the login is
ok then the method returns login information encoded as an NSURL. If the login
is not ok then the method displays an error box and waits for new login. The
user may terminate application using &ldquo;Quit&rdquo; button.</p>
	</div>
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">OdbcAppDelegate.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/managedObjectContext" title="managedObjectContext"></a>
	<h3 class="subsubtitle method-title">managedObjectContext</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>This is the property to bind to.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>@property (readonly, nonatomic) NSManagedObjectContext *managedObjectContext</code></div>

    
	
	
	
	<div class="method-subsection return">
		<h4 class="method-subtitle parameter-title">Return Value</h4>
		<p>Core Data NSManagedObjectContext for the application.</p>
	</div>
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>If you use NSArrayCntroller for data access then in its Attribute Inspector in
XCode Interface Builder you should set it to entity mode and specify the entity
name as shown below:</p>

<center>
<img src="../docs/Images/OwnCoreDataArrayControllerAttributes.png" alt="OwnCoreDataArrayControlerAttributes.png">
</center>


<p>The entity &lsquo;Author&rsquo; is only an example. You should replace it with your own entity.</p>

<p>Next in Bindings Inspector in Managed Object Context you should bind to AppDelegate
using managedObjectContext as Model Key Path. This is shown below:</p>

<center>
<img src="../docs/Images/OwnCoreDataArrayControllerBindnings.png" alt="OwnCoreDataArrayControllerBindings.png">
</center>

	</div>
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">OdbcAppDelegate.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/managedObjectModel" title="managedObjectModel"></a>
	<h3 class="subsubtitle method-title">managedObjectModel</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>This returns Core Data NSManagedObjectModel for the application.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>@property (readonly, nonatomic) NSManagedObjectModel *managedObjectModel</code></div>

    
	
	
	
	<div class="method-subsection return">
		<h4 class="method-subtitle parameter-title">Return Value</h4>
		<p>NSManagedObjectModel for the application</p>
	</div>
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<div class="warning"><p><strong>Warning:</strong> Currently the model file name must be the same as applications.</p></div>
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">OdbcAppDelegate.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/modelFileName" title="modelFileName"></a>
	<h3 class="subsubtitle method-title">modelFileName</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>Returns model file name.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>@property (readonly, nonatomic) NSString *modelFileName</code></div>

    
	
	
	
	<div class="method-subsection return">
		<h4 class="method-subtitle parameter-title">Return Value</h4>
		<p>NSString containing model file name without extension.</p>
	</div>
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>This property returns model file name without extension. Implement it if your
model has other name than your application. Default implementation return name
of your application.</p>
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">OdbcAppDelegate.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/persistentStoreClass" title="persistentStoreClass"></a>
	<h3 class="subsubtitle method-title">persistentStoreClass</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>This returns persistent store class name as NSString.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>@property (readonly, nonatomic) NSString *persistentStoreClass</code></div>

    
	
	
	
	<div class="method-subsection return">
		<h4 class="method-subtitle parameter-title">Return Value</h4>
		<p>Persistent Store Class Name</p>
	</div>
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>The default implementation returns @&ldquo;OdbcStore&rdquo;.</p>
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">OdbcAppDelegate.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/persistentStoreCoordinator" title="persistentStoreCoordinator"></a>
	<h3 class="subsubtitle method-title">persistentStoreCoordinator</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>This returns NSPersistentStoreCoordinator for the application.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>@property (readonly, nonatomic) NSPersistentStoreCoordinator *persistentStoreCoordinator</code></div>

    
	
	
	
	<div class="method-subsection return">
		<h4 class="method-subtitle parameter-title">Return Value</h4>
		<p>Persistent Store Coordinator</p>
	</div>
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">OdbcAppDelegate.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/persistentStoreType" title="persistentStoreType"></a>
	<h3 class="subsubtitle method-title">persistentStoreType</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>This returns persistent store type as NSString.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>@property (readonly, nonatomic) NSString *persistentStoreType</code></div>

    
	
	
	
	<div class="method-subsection return">
		<h4 class="method-subtitle parameter-title">Return Value</h4>
		<p>NSPersistentStoreType</p>
	</div>
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>The default implementation returns @&ldquo;OdbcStore&rdquo;.</p>
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">OdbcAppDelegate.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/persistentStoreUrl" title="persistentStoreUrl"></a>
	<h3 class="subsubtitle method-title">persistentStoreUrl</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>This property returns ODBC URL. It should be overwriten by subclasses.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>@property (readonly, nonatomic) NSURL *persistentStoreUrl</code></div>

    
	
	
	
	<div class="method-subsection return">
		<h4 class="method-subtitle parameter-title">Return Value</h4>
		<p>ODBC URL for ODBC database to use.</p>
	</div>
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>Returned URL should have following format:</p>

<pre><code>
odbc::&#47;//[data source name]/?username=[username]&password=[password]
</code></pre>


<p>where |data source name] is ODBC data source name, [username] is database username
and [password] is users password.</p>
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">OdbcAppDelegate.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/productName" title="productName"></a>
	<h3 class="subsubtitle method-title">productName</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>This returns application name as NSString.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>@property (readonly, nonatomic) NSString *productName</code></div>

    
	
	
	
	<div class="method-subsection return">
		<h4 class="method-subtitle parameter-title">Return Value</h4>
		<p>application name</p>
	</div>
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">OdbcAppDelegate.h</code><br />
	</div>				
	
	
</div>
						
					</div>
					
					
					
					
					
					<div class="section section-methods">
						<a title="Instance Methods" name="instance_methods"></a>
						<h2 class="subtitle subtitle-methods">Instance Methods</h2>
						
						<div class="section-method">
	<a name="//api/name/applicationDidFinishLaunching:" title="applicationDidFinishLaunching:"></a>
	<h3 class="subsubtitle method-title">applicationDidFinishLaunching:</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>If you implement this method then you should call the superclass
applicationDidFinishLaunching in the beginning of your method. Implementation
provided here needs to do some cleanup if the method <a href="#//api/name/loginUrl">loginUrl</a> was called.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>- (void)applicationDidFinishLaunching:(NSNotification *)<em>notification</em></code></div>

    
	
	<div class="method-subsection arguments-section parameters">
		<h4 class="method-subtitle parameter-title">Parameters</h4>
		
		<dl class="argument-def parameter-def">
			<dt><em>notification</em></dt>
			<dd><p>a notification</p></dd>
		</dl>
		
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>See also Apple documentaton of NSApplicationDelegate protocol for the description.</p>
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">OdbcAppDelegate.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/applicationShouldTerminate:" title="applicationShouldTerminate:"></a>
	<h3 class="subsubtitle method-title">applicationShouldTerminate:</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>This method saves data by calling saveAction and then it terminates the application.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)<em>sender</em></code></div>

    
	
	<div class="method-subsection arguments-section parameters">
		<h4 class="method-subtitle parameter-title">Parameters</h4>
		
		<dl class="argument-def parameter-def">
			<dt><em>sender</em></dt>
			<dd><p>NSApplication</p></dd>
		</dl>
		
	</div>
	
	
	
	<div class="method-subsection return">
		<h4 class="method-subtitle parameter-title">Return Value</h4>
		<p>NSApplicationTerminateReply</p>
	</div>
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>See Apple also documentaton of NSApplicationDelegate protocol for the description.</p>
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">OdbcAppDelegate.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/predicateForEntity:" title="predicateForEntity:"></a>
	<h3 class="subsubtitle method-title">predicateForEntity:</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>This method shall return fetch predicate given entity.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>- (NSPredicate *)predicateForEntity:(NSEntityDescription *)<em>entity</em></code></div>

    
	
	<div class="method-subsection arguments-section parameters">
		<h4 class="method-subtitle parameter-title">Parameters</h4>
		
		<dl class="argument-def parameter-def">
			<dt><em>entity</em></dt>
			<dd><p>the entity to return a predicate for.</p></dd>
		</dl>
		
	</div>
	
	
	
	<div class="method-subsection return">
		<h4 class="method-subtitle parameter-title">Return Value</h4>
		<p>NSPredicate or nil.</p>
	</div>
	
	
	
	
	
	<div class="method-subsection discussion-section">
		<h4 class="method-subtitle">Discussion</h4>
		<p>This method shall be implemented by an application when application is using
predicates to fetch data. The default implementation returna nil which means
that no predicate is used.</p>
	</div>
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">OdbcAppDelegate.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/reloadAction:" title="reloadAction:"></a>
	<h3 class="subsubtitle method-title">reloadAction:</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>This action reloads data from the database.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>- (IBAction)reloadAction:(id)<em>sender</em></code></div>

    
	
	<div class="method-subsection arguments-section parameters">
		<h4 class="method-subtitle parameter-title">Parameters</h4>
		
		<dl class="argument-def parameter-def">
			<dt><em>sender</em></dt>
			<dd><p>the sender of the message - can be nil</p></dd>
		</dl>
		
	</div>
	
	
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">OdbcAppDelegate.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/saveAction:" title="saveAction:"></a>
	<h3 class="subsubtitle method-title">saveAction:</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>This action saves all changes to the database.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>- (IBAction)saveAction:(id)<em>sender</em></code></div>

    
	
	<div class="method-subsection arguments-section parameters">
		<h4 class="method-subtitle parameter-title">Parameters</h4>
		
		<dl class="argument-def parameter-def">
			<dt><em>sender</em></dt>
			<dd><p>the sender of the message - can be nil</p></dd>
		</dl>
		
	</div>
	
	
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">OdbcAppDelegate.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/shouldSaveDataOnExit" title="shouldSaveDataOnExit"></a>
	<h3 class="subsubtitle method-title">shouldSaveDataOnExit</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>if you dont want do save data in the database on exit, implement this method and
return NO</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>- (bool)shouldSaveDataOnExit</code></div>

    
	
	
	
	<div class="method-subsection return">
		<h4 class="method-subtitle parameter-title">Return Value</h4>
		<p>bool</p>
	</div>
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">OdbcAppDelegate.h</code><br />
	</div>				
	
	
</div>
						
						<div class="section-method">
	<a name="//api/name/windowWillReturnUndoManager:" title="windowWillReturnUndoManager:"></a>
	<h3 class="subsubtitle method-title">windowWillReturnUndoManager:</h3>
	
	
	
	<div class="method-subsection brief-description">
		<p>This method returns undo manager for given window.</p>
	</div>		
	
    

	<div class="method-subsection method-declaration"><code>- (NSUndoManager *)windowWillReturnUndoManager:(NSWindow *)<em>window</em></code></div>

    
	
	<div class="method-subsection arguments-section parameters">
		<h4 class="method-subtitle parameter-title">Parameters</h4>
		
		<dl class="argument-def parameter-def">
			<dt><em>window</em></dt>
			<dd><p>the window</p></dd>
		</dl>
		
	</div>
	
	
	
	<div class="method-subsection return">
		<h4 class="method-subtitle parameter-title">Return Value</h4>
		<p>undo manager</p>
	</div>
	
	
	
	
	
	
	
	
	
	
	
	<div class="method-subsection declared-in-section">
		<h4 class="method-subtitle">Declared In</h4>
		<code class="declared-in-ref">OdbcAppDelegate.h</code><br />
	</div>				
	
	
</div>
						
					</div>
					
					
                    
                    
				</div>
				<div class="main-navigation navigation-bottom">
					<ul>
	<li><a href="../index.html">Index</a></li>
	<li><a href="../hierarchy.html">Hierarchy</a></li>
</ul>
				</div>
				<div id="footer">
					<hr />
					<div class="footer-copyright">
						<p><span class="copyright">&copy; 2014 Datakonsulten AB. All rights reserved. (Last updated: 2014-01-22)</span><br />
						
						<span class="generator">Generated by <a href="http://appledoc.gentlebytes.com">appledoc 2.2 (build 961)</a>.</span></p>
						
					</div>
				</div>
			</div>
		</article>
		<script type="text/javascript">
			function jumpToChange()
			{
				window.location.hash = this.options[this.selectedIndex].value;
			}
			
			function toggleTOC()
			{
				var contents = document.getElementById('contents');
				var tocContainer = document.getElementById('tocContainer');
				
				if (this.getAttribute('class') == 'open')
				{
					this.setAttribute('class', '');
					contents.setAttribute('class', '');
					tocContainer.setAttribute('class', '');
					
					window.name = "hideTOC";
				}
				else
				{
					this.setAttribute('class', 'open');
					contents.setAttribute('class', 'isShowingTOC');
					tocContainer.setAttribute('class', 'isShowingTOC');
					
					window.name = "";
				}
				return false;
			}
			
			function toggleTOCEntryChildren(e)
			{
				e.stopPropagation();
				var currentClass = this.getAttribute('class');
				if (currentClass == 'children') {
					this.setAttribute('class', 'children open');
				}
				else if (currentClass == 'children open') {
					this.setAttribute('class', 'children');
				}
				return false;
			}
			
			function tocEntryClick(e)
			{
				e.stopPropagation();
				return true;
			}
			
			function init()
			{
				var selectElement = document.getElementById('jumpTo');
				selectElement.addEventListener('change', jumpToChange, false);
				
				var tocButton = document.getElementById('table_of_contents');
				tocButton.addEventListener('click', toggleTOC, false);
				
				var taskTreeItem = document.getElementById('task_treeitem');
				if (taskTreeItem.getElementsByTagName('li').length > 0)
				{
					taskTreeItem.setAttribute('class', 'children');
					taskTreeItem.firstChild.setAttribute('class', 'disclosure');
				}
				
				var tocList = document.getElementById('toc');
				
				var tocEntries = tocList.getElementsByTagName('li');
				for (var i = 0; i < tocEntries.length; i++) {
					tocEntries[i].addEventListener('click', toggleTOCEntryChildren, false);
				}
				
				var tocLinks = tocList.getElementsByTagName('a');
				for (var i = 0; i < tocLinks.length; i++) {
					tocLinks[i].addEventListener('click', tocEntryClick, false);
				}
				
				if (window.name == "hideTOC") {
					toggleTOC.call(tocButton);
				}
			}
			
			window.onload = init;
			
			// If showing in Xcode, hide the TOC and Header
			if (navigator.userAgent.match(/xcode/i)) {
				document.getElementById("contents").className = "hideInXcode"
				document.getElementById("tocContainer").className = "hideInXcode"
				document.getElementById("top_header").className = "hideInXcode"
			}
			
		</script>
	</body>
</html>